<template>
  <div class="header">
    <div class="fr">
        <el-dropdown>
            <span class="el-dropdown-link">{{username}} <i class="el-icon-arrow-down el-icon--right"></i>
            </span>
            <el-dropdown-menu slot="dropdown">
                <el-dropdown-item>个人中心</el-dropdown-item>
                <el-dropdown-item>退出登录</el-dropdown-item>
            </el-dropdown-menu>
        </el-dropdown>
    </div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
    computed: {
        ...mapGetters({
            username: 'username'
        })
    },
    data () {
        return {
            
        }
    }
}
</script>

<style scoped>
    .fr{
        float: right;
    }
</style>